ip name-server

This command defines the DNS relay server’s address on all Layer 3 interfaces. Use the no form of this command to the undefined DNS relay server’s address on all Layer 3 interfaces.

Syntax

ip name-server <first ip address> all
ip name-server <first ip address> [<second ip address>|all]

Command

Description

first ip address

Specifies the primary DNS server address. Specifies a valid IPv4 (dotted-decimal notation) or IPv6 address.

second ip address

Specifies the secondary DNS server address. This field is not required when specifying a single IP address. It specifies a valid IPv4 (dotted-decimal notation) or IPv6 address.

all

Apply to all interfaces.

Default

NA

Related Commands

This command is also available from the interface configuration sub-directory.

Command Mode

Privileged User

Example

This example defines DNS relay servers 10.4.1.1 and 10.4.1.2 for all Layer 3 interfaces:

(config data)# ip name-server 10.4.1.1 10.4.1.2